package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CaseHealthConditionMapper;
import com.ruoyi.system.domain.CaseHealthCondition;
import com.ruoyi.system.service.ICaseHealthConditionService;
import com.ruoyi.common.core.text.Convert;

/**
 * 病例健康状况Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-03
 */
@Service
public class CaseHealthConditionServiceImpl implements ICaseHealthConditionService 
{
    @Autowired
    private CaseHealthConditionMapper caseHealthConditionMapper;

    /**
     * 查询病例健康状况
     * 
     * @param id 病例健康状况主键
     * @return 病例健康状况
     */
    @Override
    public CaseHealthCondition selectCaseHealthConditionById(Long id)
    {
        return caseHealthConditionMapper.selectCaseHealthConditionById(id);
    }

    /**
     * 查询病例健康状况列表
     * 
     * @param caseHealthCondition 病例健康状况
     * @return 病例健康状况
     */
    @Override
    public List<CaseHealthCondition> selectCaseHealthConditionList(CaseHealthCondition caseHealthCondition)
    {
        return caseHealthConditionMapper.selectCaseHealthConditionList(caseHealthCondition);
    }

    /**
     * 新增病例健康状况
     * 
     * @param caseHealthCondition 病例健康状况
     * @return 结果
     */
    @Override
    public int insertCaseHealthCondition(CaseHealthCondition caseHealthCondition)
    {
        return caseHealthConditionMapper.insertCaseHealthCondition(caseHealthCondition);
    }

    /**
     * 修改病例健康状况
     * 
     * @param caseHealthCondition 病例健康状况
     * @return 结果
     */
    @Override
    public int updateCaseHealthCondition(CaseHealthCondition caseHealthCondition)
    {
        return caseHealthConditionMapper.updateCaseHealthCondition(caseHealthCondition);
    }

    /**
     * 批量删除病例健康状况
     * 
     * @param ids 需要删除的病例健康状况主键
     * @return 结果
     */
    @Override
    public int deleteCaseHealthConditionByIds(String ids)
    {
        return caseHealthConditionMapper.deleteCaseHealthConditionByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除病例健康状况信息
     * 
     * @param id 病例健康状况主键
     * @return 结果
     */
    @Override
    public int deleteCaseHealthConditionById(Long id)
    {
        return caseHealthConditionMapper.deleteCaseHealthConditionById(id);
    }
}
